package com.dong.router.activity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.dong.router.annotation.Router
import com.dong.router.api.RouterManager
import com.dong.router.databinding.ActivityMainBinding

@Router("MainActivity", module = "main")
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)
        binding.btn1.setOnClickListener {
            RouterManager.instance.build("OtherActivity")
                .navigation(this)
        }

        binding.btn2.setOnClickListener {
            RouterManager.instance.build("VideoActivity")
                .navigation(this)
        }
    }
}